package edu.fiu.cis.personalize.server.objectrank;

public class NodeRank {

	private NodeRef nodeRef;
	private double currRank;
	private double prevRank;

	public NodeRank(NodeRef nodeRef, double rank) {
		super();
		this.nodeRef = nodeRef;
		this.currRank = rank;
		this.prevRank = 0;
	}

	public void setRank(double rank) {
		this.prevRank = currRank;
		this.currRank = rank;
	}

	public Double getRank() {
		return currRank;
	}

	public NodeRef getNodeRef() {
		return nodeRef;
	}

	public double getDelta() {
		return Math.abs(prevRank - currRank);
	}
}
